package com.pingan.glue.gluegame.common;

public enum AwardContent {
    TOUR_TICKET(0,3,"1","旅游券"),
    CINEMA_TICKET(4,6,"2","电影票"),
    MEAL_TICKET(7,9,"3","餐券"),
    COFFEE_TICKET(10,10,"4","咖啡券"),
    NO_TICKET(0,10000000,"0","没有中奖"),
    ;

    private int min;
    private int max;
    private String award;
    private String name;

    AwardContent(int min, int max, String award, String name) {
        this.min = min;
        this.max = max;
        this.award = award;
        this.name = name;
    }


    public static String content(int order){
        for (AwardContent awardContent: AwardContent.values()) {
            if (awardContent.max >= order){
                return awardContent.award;
            }
        }
        return NO_TICKET.award;
    }

}
